package com.first.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.first.common.pojo.TbMember;
import com.first.order.dao.QianOrderQueryDao;
import com.first.order.service.QianOrderQueryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;

import java.util.List;
@Service
public class QianOrderQueryServiceImpl implements QianOrderQueryService {
        @Autowired
        private QianOrderQueryDao qianOrderQueryDao;

    @Override
    public List<TbMember> queryMemberStatus(String mobileId) {
        QueryWrapper<TbMember> wrapper = new QueryWrapper<>();
        if (StringUtils.hasText(mobileId)){
            wrapper.eq("mobile",mobileId);
        }
        List<TbMember> tbMembers = qianOrderQueryDao.selectList(wrapper);
        return tbMembers;
    }
}
